#!/bin/python
# -*- coding: gb2312; mode:python ; tab-width:4 -*- ex:set tabstop=4 shiftwidth=4 expandtab: -*-
import sys
from distutils.core import setup
import py2exe
#import numpy
import email


def main():
    """
    Script invokation logic.
    """
    if len(sys.argv) > 1 and sys.argv[1] == "py2exe":
        setup_py2exe()
        sys.exit()

def setup_py2exe():
    from distutils.core import setup
    import py2exe
    excludes = ["pywin.debugger", "pywin.debugger.dbgcon",
            "pywin.dialogs", "pywin.dialogs.list",
            "Tkconstants","Tkinter","tcl","wx.BitmapFromImage",
            ]
    setup(
           name         = "SimpleWSN"+_("WSN Lab System"),
##           description  = "973 WSN Testsuite",
           author       = "ISCAS",
##           author_email = "huangfuwei@ios.cn",
	   windows = [
           {
            "script": "ClientApp.py",
            "icon_resources": [(1, "Client.ico")]
           }],
           version = "1.0",
           options = { "py2exe": {"compressed"  : 1,
                                  "optimize"    : 2,
                                  "ascii"       : 1,
                                  "excludes":    excludes,
                                  "packages" : ["encodings"],
                                  "bundle_files": 1   } },
           zipfile = None
           

         )

if __name__ == '__main__':
    main()